				<div id="container" >
					<div class="grid_16">
						<div id="graph">
							<h2>Completion Time</h2>
							<p>Completion time measures the time spent to execute the internal code of the instrumented methods.</p>
							<?php 
							
							if($methods != false){
								echo '<p>First completion time: <b>' . $minMaxTime[0] . '</b><br />';
								echo 'Last completion time: <b>' . $minMaxTime[1] . '</b></p>';
							
					        	$requests = array('name'=>'requests', 
										      'value'=> set_value('requests', '1000'), 
										      'maxlength'=>'4', 'size'=>'5', 'id' => 'requests');
					        	$min_value = array('name'=>'min_value', 
										      'value'=> set_value('min_value', '0.005'), 
										      'maxlength'=>'11', 'size'=>'12', 'id' => 'over');
					        	$from = array('name'=>'response_time', 
										      'value'=> set_value('response_time'), 
										      'maxlength'=> '19', 'size'=>'20', 'class' => 'datetimepicker');
							?>
							</p>
							<?php echo validation_errors('<p style="font-weight: bold;color: #ff0000;">', '</p>'); ?>
							<?php echo form_open('completion'); ?>
							<div class="grid_16">
								<div class="grid_2">
									<p>Show<br />
									<?php echo form_input($requests); ?></p>
								</div>
								<div class="grid_5">
									<p>requests, for<br />
									<?php echo form_dropdown('methods', $methods, 'all', 'id="methods"'); ?></p>
								</div>
								<div class="grid_3">
									<p>over<br />
									<?php echo form_input($min_value); ?></p>
								</div>
								<div class="grid_3">
									<p>seconds, starting from<br />
									<?php echo form_input($from); ?></p>
								</div>
							</div>
							<div class="clear"></div>
							<div class="grid_2">
								<div class="grid_2">
									<p><br /><?php echo form_submit('submit', 'Go'); ?></p>
								</div>
							</div>	
							<div class="clear"></div>
							</form>
							<?php } ?>
							<p>&nbsp;</p>
							<p>The completion time instrumentation class is instantiated at the beginning of the code execution in the method. Before the
							method returns a value, the PHP garbage collector terminates the instrumentation object and also stops the instrumentation.</p>
							<p>To ensure good chart portability the number of maximum requests loaded at once in a chart is restricted to 3000.</p>
							<p>By default all the requests <b>over 1 second</b> from the <b>last 24 hours</b> are shown.</p>
							<p>&nbsp;</p>
							<p>
							<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/swfobject.js"></script>
							
									<!-- chart is placed in this div -->
									<div id="line">
										You need to install Flash player.
									</div>
								    <script type="text/javascript">
								    
							            var params = {
							                bgcolor:"#eee"
							                };
							
									    var flashVars = {
									        path: "assets/other/",
									        settings_file: encodeURIComponent("assets/other/completion.xml"),
									        data_file: encodeURIComponent("index.php/completion/xml/" + "<?php echo $xml['requests'] . '/' . $xml['over'] . '/' . $xml['from'] . '/' . $xml['method']; ?>"),
									        chart_id:"line"
										};
							
								    	swfobject.embedSWF("assets/other/amline.swf", "line", "920", "600", "8.0.0", "assets/other/expressInstall.swf", flashVars, params);

							            // CHART INITED //////////////////////////////////////////////////////////////////////////    
							            // amChartInited(chart_id)
							            // This function is called when the chart is fully loaded and initialized.
							            function amChartInited(chart_id){
							              // get the flash object into "flashMovie" variable   
							              flashMovie = document.getElementById(chart_id);
							              // tell the field with id "chartfinished" that this chart was initialized
							              document.getElementById("chartfinished").value = chart_id;       
							            }
							  </script>
							  </p>
						</div>
					</div>
					<div class="clear"></div>
				</div><!-- End container -->